package com.cuijq.ms.Interpreterdesign.v2;

/**
 * @author by CuiJQ
 * @Classname AdditionExpression
 * @Description AdditionExpression Description
 * @Date 2021/5/31 15:34
 */
public class AdditionExpression implements Expression {

  private Expression exp1;
  private Expression exp2;

  public AdditionExpression(Expression exp1, Expression exp2) {
    this.exp1 = exp1;
    this.exp2 = exp2;
  }

  @Override
  public long interpret() {
    return exp1.interpret() + exp2.interpret();
  }

}
